<?
//inculde即可以使用data数据。本页所有的data数据，倾在controller都处理好
include_once("../../../common/modules/checkA.php");
include_once("../../../../config.php");
include_once("../controller/detail-list.php");


?>



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <link href="../css/<? echo $theme_folder ?>/user.css" rel="stylesheet" type="text/css"/>
    <?php include ROOT_PATH_.'/controller/common/modules/head.php'; ?>
    <?php include 'modules/head.php'; ?>
</head>


<body>

<div id="topbar">
    <?php include ROOT_PATH_.'/controller/common/modules/topbar.php'; ?>
</div>

<div id="container" class="<? echo $system_part ?>">

    <div id="maincontent">

        <div id="sidebar">
            <?php include ROOT_PATH_.'/controller/common/modules/sidebar.php'; ?>
        </div>



<div id="content" class="layui-form">

	<h1> 活动申请列表 </h1>

    <div class="select-box layui-form">
        <form action="detail-list.php" >

            <div class="layui-form-item">
                <label class="layui-form-label">关键词</label>
                <div class="layui-input-block">
                    <input type="text" name="select_keywords" placeholder="可搜索活动主题" autocomplete="off" class="layui-input" value="<? echo $_REQUEST['select_keywords']?>" >
                </div>
            </div>


            <div class="layui-form-item">
                <label class="layui-form-label">活动时间</label>

                <div class="layui-input-block">
                    <input type="text" name="select_startday" placeholder="请输入开始时间" autocomplete="off" class="layui-input"  onclick="laydate({istime: true, format: 'YYYY-MM-DD'})" style="float: left; width: 112px" value="<?if($_REQUEST['select_startday']){echo $_REQUEST['select_startday'] ;} ?>" >

                    <span style="float: left;margin: 0 4px; line-height: 30px;">-</span>


                    <input type="text" name="select_endday" placeholder="请输入结束时间" autocomplete="off" class="layui-input" onclick="laydate({istime: true, format: 'YYYY-MM-DD'})"  style="float: left; width:112px" value="<?if($_REQUEST['select_endday']){echo $_REQUEST['select_endday'] ;} ?>"  >


                    <input type="hidden" name="sys_part"  value="event" >


                </div>


            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">标签</label>

                <div class="layui-input-block">
                    <select name="tag" >
                        <option value="0">请选择</option>
                        <?
                        $tags = select_one_line_all_items($table_Prefix."event_plate",'nid= 1');

                        $tag_list = explode(',',$tags['tag']);

                        foreach ($tag_list as $tval){
                        ?>
                        <option value="<? echo $tval?>" <? if($_REQUEST['tag']==$tval){echo "selected";} ?>><?echo $tval?></option>

                        <?}?>
                    </select>
                </div>
            </div>

            <button class="layui-btn" ><i class="layui-icon">&#xe615;</i> 查找</button>
            <br class="clearfloat"/>
        </form>

    </div>



<!-- 用$system_part .list_boxes来控制来到确认板块信息显示-->
<div class="list-box">


<div class="list-boxes">



<?php

if ($detailnum == 0) {
    echo "数据添加中";
}

?>




<table class="layui-table">
  <colgroup>
    <col width="60">
      <col width="70">
    <col width="200">
	<col >
	<col >
	<col >
	<col >
	<col >
      <col >
      <col >
<!--      <col >-->
      <col >
    <col>
    <col>


  </colgroup>
  <thead>
    <tr>
      <th>序号</th>
        <th>活动id</th>
      <th>活动主题</th>
        <th>标签</th>
        <th>活动价格</th>
        <th>报名开始</th>
        <th>报名结束</th>
      <th>活动开始</th>
      <th>活动结束</th>
      <th>活动人数</th>
<!--      <th>已报人数</th>-->
<!--        <th>首页推荐</th>-->
        <th>活动状态</th>
        <th>状态</th>
      <th>操作</th>
    </tr>
  </thead>
  <tbody>


	<?php

	for ($i = 0; $i < $detailnum; $i++) {
    ?>

        <? if(date("Y-m-d 00:00:00")>$detail[$i]['endtime'])
        {
            $expire="#d8e9f5";
        }
        else
        {
            $expire="";

        }
        ?>

    <tr id="item<?echo $detail[$i]['nid']?>" style="background-color:<?echo $expire?>" >
      <td><? echo $i+1+$plate['page_list_num']*($nowpageid-1) ?></td>
        <td><? echo $detail[$i]['nid']?></td>
      <td><? echo $detail[$i]['theme']?></td>
        <td><? echo $detail[$i]['tag']?></td>
        <td><? echo $detail[$i]['price']?></td>
      <td><? echo substr($detail[$i]['apply_starttime'] ==  '' ? '' : date("Y-m-d H:i",strtotime($detail[$i]['apply_starttime'])),5,12)?></td>
      <td><? echo substr($detail[$i]['apply_endtime'] ==  '' ? '' : date("Y-m-d H:i",strtotime($detail[$i]['apply_endtime'])),5,12)?></td>
      <td><? echo substr($detail[$i]['starttime'] ==  '' ? '' : date("Y-m-d H:i",strtotime($detail[$i]['starttime'])),5,12)?></td>


        <td >


            <? echo substr($detail[$i]['endtime'] ==  '' ? '' : date("Y-m-d H:i",strtotime($detail[$i]['endtime'])),5,12)?>

        </td>


<!--	  <td>--><?// echo $detail[$i]['sum_member']?><!--</td>-->
	  <td>
	  	  <a href="detail-list-register.php?sys_part=activity&nid=<?php echo $detail[$i]['nid'];?>">
              <? echo count_people($detail[$i]['nid']);?> / <? echo $detail[$i]['sum_member']?>
          </a>
     </td>
<!--        <td>--><?// echo $detail[$i]['recommend'] ==1  ? '是':'否' ?><!--</td>-->

        <td><?
            if($detail[$i]['event_status'] == 0){
                echo '<span style="color: #00a0e9">组局中</span>';
            }
            elseif($detail[$i]['event_status'] == 1){
                echo '<span style="color: #ff0000">成局</span>';
            }
            elseif($detail[$i]['event_status'] == 2){
                echo '<span style="color: #f0ad4e">流局</span>';
            }
            ?>
        </td>

        <td><?
            if($detail[$i]['status'] == 1){
                echo '发布中';
            }
            elseif($detail[$i]['status'] == 2){
                echo '未发布';
            }
//            elseif($detail[$i]['status'] == 0){
//                echo '待审核';
//            }
            ?>
        </td>

	  <td>
          <a href="detail-edit.php?sys_part=event&nid=<? echo $detail[$i]['nid']?>&nowpageid=<?echo $nowpageid?>"
             class="layui-btn layui-btn-primary layui-btn-xs" >修改
            <i class="layui-icon">&#xe642;</i>
          </a>


          <a href="detail-list-register.php?sys_part=event&nid=<?php echo $detail[$i]['nid'];?>"
             class="layui-btn layui-btn-primary layui-btn-xs" >信息
              <i class="layui-icon">&#xe642;</i>
          </a>

  		 <a href="javascript:void(0)" onclick="delItem (<?php echo $detail[$i]['nid']?>)"
            class="delete layui-btn layui-btn-primary layui-btn-xs" >删除 <i class="layui-icon">&#xe640;</i> </a>
  		</td>
    </tr>
  <?php

}
?>


  </tbody>
</table>






</div>



    <div class="list-box-function"
        <? if ($detailnum == 0) {
            echo "style" . "='display:none'";
        } ?>
        >

        <?php include 'modules/page_numbers.php'; ?>

    </div>
</div>


<!--list-box end-->
</div>

<!--content端點01-->
</div>
<!--maincontent端點01-->
<br class="clearfloat"/>
</div>
<!--container端點01-->
</div>







<!--删除box-->
<?php include ROOT_PATH_.'/controller/common/modules/deletebar.php'; ?>
<!--删除box end-->

<?php include ROOT_PATH_."/controller/common/modules/footer.php"; ?>

asd
</body>
</html>
